package com.zpl.goods.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zpl.goods.enums.CategoryStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author wangyuxin
 * @date 2020/9/29
 */
@Data
@TableName("category")
@ApiModel(value = "类别", description = "类别实体")
public class CategoryUS {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id", required = true)
    private Long id;
    @ApiModelProperty(value = "父类id", required = true)
    @TableField(value = "parent_id")
    private Long parentId;
    @ApiModelProperty(value = "类别名", required = true)
    @TableField(value = "category_name")
    private String categoryName;
    @ApiModelProperty(value = "状态", required = true)
    private CategoryStatus status;
    @ApiModelProperty(value = "创建日期", required = true)
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime createDate;
    @ApiModelProperty(value = "修改日期", required = true)
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime updateDate;
    public Long operatorId;
}
